<?php


namespace app\api\model;


use think\Model;

class BaseModel extends Model
{
    protected $hidden = ['delete_time', 'update_time'];
    //固定函数 读取器
//    public function getUrlAttr($vaule, $data) {
//        if ($data['from'] == 1) {
//            return config('setting.img_prefix') . $vaule;
//        }
//        return $vaule;
//    }

    protected function prefixImgUrl($vaule, $data) {
        if ($data['from'] == 1) {
            return config('setting.img_prefix').$vaule;
        }
        return $vaule;
    }

}